﻿using Colorful.Furniture.IEntity;
using FreeSql.DataAnnotations;
using System;

namespace Colorful.Furniture.ErpInventoryManagement;

/// <summary>
/// 商品所属供应商信息
/// </summary>
[Table(Name = "erp_bbs_inventory_product")]
public class InventoryProduct : AuditTenantSoftDeleteAggregateRoot
{
    /// <summary>
    ///   编码
    /// </summary>
    [Column(Name = "id")]
    public Guid Id { get; set; }

    /// <summary>
    ///   产品编码
    /// </summary>
    [Column(Name = "inventory_id")]
    public Guid? InventoryId { get; set; }

    /// <summary>
    ///  产品编号
    /// </summary>
    [Column(Name = "product_no", StringLength = 100)]
    public string ProductNo { get; set; }

    /// <summary>
    ///  供应商编码
    /// </summary>
    [Column(Name = "supplier_id")]
    public Guid? SupplierId { get; set; }

    /// <summary>
    ///  供应商产品名称
    /// </summary>
    [Column(Name = "supplier_product_name", StringLength = 150)]
    public string SupplierProductName { get; set; }

    /// <summary>
    ///  供应商产品编号
    /// </summary>
    [Column(Name = "supplier_product_no", StringLength = 150)]
    public string SupplierProductNo { get; set; }

    /// <summary>
    ///  帐号所属类型
    /// </summary>
    [Column(Name = "acct_type", StringLength = 150)]
    public string AcctType { get; set; }

    /// <summary>
    ///  供应商成本总价
    /// </summary>
    [Column(Name = "cost_price", Scale = 4, Precision = 8)]
    public decimal? CostPrice { get; set; }

    /// <summary>
    ///  供应商成本单价
    /// </summary>
    [Column(Name = "cost_unit_price", Scale = 4, Precision = 8)]
    public decimal? CostUnitPrice { get; set; }

    /// <summary>
    ///  排序字段：值越大越靠前
    /// </summary>
    [Column(Name = "sort")]
    public int? Sort { get; set; }

    /// <summary>
    ///  是否启用：1 = 是；0 = 否；
    /// </summary>
    [Column(Name = "is_enable")]
    public int? IsEnable { get; set; }

    /// <summary>
    ///  换算比例：1个客户订单数量 = * 个供应商订单数量
    /// </summary>
    [Column(Name = "supplier_qty")]
    public int? SupplierQty { get; set; }

    /// <summary>
    ///  下游最大提交数量
    /// </summary>
    [Column(Name = "max_qty")]
    public int? MaxQty { get; set; }

    /// <summary>
    ///  下游最小提交数量
    /// </summary>
    [Column(Name = "min_qty")]
    public int? MinQty { get; set; }

    /// <summary>
    ///  产品
    /// </summary>
    public Inventory Inventory { get; set; }

    /// <summary>
    ///  折扣
    /// </summary>
    [Column(Name = "discount", Scale = 4, Precision = 8)]
    public decimal? Discount { get; set; }

}